// pages/member/member_income.js
var app=getApp();
var that;
Page({
  data: {
    list:[]
  },
  onLoad: function (options) {
  that=this;
  that.get_record();
  },

  onReady: function () {
  
  },
  onShow: function () {
  
  },
  get_record:function(){
    app.req("get_record.html", { "openid": app.data.openid }, function (res) {
      if (res.status == "success") {
        for (var i = 0; i <res.mess.length;i++){
          if (parseFloat(res.mess[i].money)>0){
            res.mess[i].m = "jia"
          } else { res.mess[i].m = "jian"}
          // if (res.mess[i].title.indexOf("值") > 0 || res.mess[i].title=="入住押金回退"){
          //     res.mess[i].m="jia"
          // } else { res.mess[i].m = "jian"}
        }
        that.setData({ list: res.mess })
      } else if (res.status == "error") {
        app.toast_up(res.mess)
      } else {
        app.modal("错误提示", "网络错误，是否重试？", function (re) {
          if (re) {
            that.get_record()
          }
        })
      }
    })
  }
})